<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

    return [
        '__pattern__' => [
            'name' => '\w+',
        ],
        '[api/live/config]'=> [
            '' => ['index/Live/getConfig', ['method' => 'post']]
        ],
        '[api/index]'=> [
            '' => ['api/Api/index', ['method' => 'post']]
        ],
        '[api/test]'=> [
            '' => ['api/Api/test', ['method' => 'post']]
        ],
        // ######直播api#######
        // 加入购物车
        '[api/live/addToCart]'=> [
            '' => ['index/Live/addToCart', ['method' => 'post']]
        ],
        // 新订单
        '[api/live/addOrder]'=> [
            '' => ['index/Live/addOrder', ['method' => 'post']]
        ],
        // 授权
        '[api/live/authorize]'=> [
            '' => ['index/Live/authorize', ['method' => 'post']]
        ],
        // 申请主播
        '[api/live/applySignAnchor]'=> [
            '' => ['index/Live/applySignAnchor', ['method' => 'post']]
        ],
        // 同意主播
        '[api/live/agreeSignAnchor]'=> [
            '' => ['index/Live/agreeSignAnchor', ['method' => 'post']]
        ],
        // 拒绝
        '[api/live/rejectSignAnchor]'=> [
            '' => ['index/Live/rejectSignAnchor', ['method' => 'post']]
        ],
        /**
         * 获取主播列表
         * id: 指定id
         * isFollow： 是否获取我关注的主播，需要uid和web_id，用户端才调用
         * isLive：是否获取主播此刻有没有活动正在直播。返回字段：isLiveStart
         * uid；用户id
         * domain：域名
         */
        '[api/live/getAnchors]'=> [
            '' => ['index/Live/getAnchors', ['method' => 'post']]
        ],
        
        /**
         * 主播详情
         * id: 指定id
         * isFollow： 是否获取我关注的主播，需要uid和web_id，用户端才调用
         * isLive：是否获取主播此刻有没有活动正在直播。返回字段：isLiveStart
         * uid；用户id
         * domain：域名
         */
        '[api/live/anchorDetail]'=> [
            '' => ['index/Live/anchorDetail', ['method' => 'post']]
        ],
        /**
         * 主播点赞
         * anchorId: 主播id
         * openId： 是否获取我关注的主播，需要uid和web_id，用户端才调用
         * uid；用户id
         * domain：域名
         */
        '[api/live/zan/save]'=> [
            '' => ['index/Live/saveLiveZan', ['method' => 'post']]
        ],

        // 获取主播活动列表
        '[api/live/getAnchorLives]'=> [
            '' => ['index/Live/getAnchorLives', ['method' => 'post']]
        ],
        // 获取活动列表
        '[api/live/getShopLives]'=> [
            '' => ['index/Live/getShopLives', ['method' => 'post']]
        ],
        // 创建活动
        '[api/live/createLive]'=> [
            '' => ['index/Live/createLive', ['method' => 'post']]
        ],
        // 编辑活动
        '[api/live/editLive]'=> [
            '' => ['index/Live/editLive', ['method' => 'post']]
        ],
        // 取消活动
        '[api/live/cancel]'=> [
            '' => ['index/Live/cancelLive', ['method' => 'post']]
        ],
        // 开始直播
        '[api/live/startLivePlay]'=> [
            '' => ['index/Live/startLivePlay', ['method' => 'post']]
        ],
        // 结束直播
        '[api/live/stopLivePlay]'=> [
            '' => ['index/Live/stopLivePlay', ['method' => 'post']]
        ],
        // 当前直播产品
        '[api/live/currentLiveProduct]'=> [
            '' => ['index/Live/currentLiveProduct', ['method' => 'post']]
        ],
        // 修改产品价格
        '[api/live/editProductPrice]'=> [
            '' => ['index/Live/editProductPrice', ['method' => 'post']]
        ],
        // 活动关联产品列表
        '[api/live/liveProducts]'=> [
            '' => ['index/Live/liveProducts', ['method' => 'post']]
        ],
        // 活动关联店铺列表
        '[api/live/getLiveShops]'=> [
            '' => ['index/Live/getLiveShops', ['method' => 'post']]
        ],
        // 主播活动关联店铺列表
        '[api/live/getAnchorLiveShops]'=> [
            '' => ['index/Live/getAnchorLiveShops', ['method' => 'post']]
        ],
        // 主播活动关联店铺列表
        '[api/live/getLiveSet]'=> [
            '' => ['index/Live/getLiveSet', ['method' => 'post']]
        ],
        // 统计直播活动用户数
        '[api/live/visitor/save]'=> [
            '' => ['index/Live/saveLiveVisitor', ['method' => 'post']]
        ],
        // ######广播api#######
        // 加入广播组
        '[api/broadcast/joinLiveGroup]'=> [
            '' => ['index/Live/joinLiveGroup', ['method' => 'post']]
        ],
        // 离开广播组
        '[api/broadcast/leaveLiveGroup]'=> [
            '' => ['index/Live/leaveLiveGroup', ['method' => 'post']]
        ],
        // 广播产品列表
        '[api/broadcast/productLives]'=> [
            '' => ['index/Broadcast/boadcastLiveProduct', ['method' => 'post']]
        ],
        '[api/broadcast/getAllClientSessions]'=> [
            '' => ['index/Broadcast/getAllClientSessions', ['method' => 'post']]
        ],
        /**
         * 加入组
         * group array|string ,['a', 'b'] | 'c'
         * clientId string
         */
        '[api/broadcast/joinGroup]'=> [
            '' => ['index/Broadcast/joinGroup', ['method' => 'post']]
        ],
        /**
         * 加入组
         * group array|string ,['a', 'b'] | 'c'
         * clientId string
         */
        '[api/broadcast/leaveGroup]'=> [
            '' => ['index/Broadcast/leaveGroup', ['method' => 'post']]
        ],
        /**
         * 加入组
         * group array|string ,['a', 'b'] | 'c'
         * clientId string
         */
        '[api/broadcast/sendGroup]'=> [
            '' => ['index/Broadcast/sendGroup', ['method' => 'post']]
        ],

        // ######用户端api#######
        '[api/user/authorize]'=> [
            '' => ['index/User/authorize', ['method' => 'post']]
        ],
        // ######其他api#######
        '[api/live/getOpenId]'=> [
            '' => ['api/Api/getOpenId', ['method' => 'post']]
        ],

        '[api/live/deleteAnchor]'=> [
            '' => ['api/Api/deleteAnchor', ['method' => 'post']]
        ],

        '[api/live/saveAnchor]'=> [
            '' => ['api/Api/saveAnchor', ['method' => 'post']]
        ],

        '[api/live/sendMobileCode]'=> [
            '' => ['api/Api/sendMobileCode', ['method' => 'post']]
        ],

        '[api/live/bandMobileCode]'=> [
            '' => ['api/Api/bandMobileCode', ['method' => 'post']]
        ],

        '[api/live/getTwoDimensionPic]'=> [
            '' => ['api/Api/getTwoDimensionPic', ['method' => 'post']]
        ],
        
        '[api/live/getWxOpenId]'=> [
            '' => ['api/Api/getWxOpenId', ['method' => 'post']]
        ],

        '[api/live/postUploadPic]'=> [
            '' => ['auth/Upload/postUploadPic', ['method' => 'post']]
        ],

        '[api/live/getLiveList]'=> [
            '' => ['api/Api/getLiveList', ['method' => 'post']]
        ],

        '[api/live/anchorList]'=> [
            '' => ['api/Api/anchorList', ['method' => 'post']]
        ],

        '[api/live/saveLivePlan]'=> [
            '' => ['api/Api/saveLivePlan', ['method' => 'post']]
        ],

        '[api/live/deleteLivePlan]'=> [
            '' => ['api/Api/deleteLivePlan', ['method' => 'post']]
        ],

        '[api/live/bandMobileRegister]'=> [
            '' => ['api/Api/bandMobileRegister', ['method' => 'post']]
        ],
        
        '[api/live/login]'=> [
            '' => ['api/Api/login', ['method' => 'post']]
        ],

        '[api/live/getLiveFollowList]'=> [
            '' => ['api/Api/getLiveFollowList', ['method' => 'post']]
        ],
        //定时任务 检测是否过期
        '[api/live/check_expire]'=> [
            '' => ['api/Api/check_expire', ['method' => 'get']]
        ],
        //定时任务 检测是否直播中
        '[api/live/check_onlive]'=> [
            '' => ['api/Api/check_onlive', ['method' => 'get']]
        ],
        //查询频道列表 
        '[api/live/channel_list]'=> [
            '' => ['api/Api/channel_list', ['method' => 'get']]
        ],
        //定时开启已关闭直播频道
        '[api/live/timing_openChannel]'=> [
            '' => ['api/Api/timing_openChannel', ['method' => 'get']]
        ],
        //暂停推流并延迟恢复
        '[api/live/channel_manager]'=> [
            '' => ['api/Api/channel_manager', ['method' => 'get']]
        ],
        //更换绑定手机
        '[api/live/updataMobile]'=> [
            '' => ['api/Api/updataMobile', ['method' => 'post']]
        ],

        //获取默认页
        '[api/live/getLivePage]'=> [
            '' => ['api/Api/getLivePage', ['method' => 'post']]
        ],

        //修改默认页
        '[api/live/saveLivePage]'=> [
            '' => ['api/Api/saveLivePage', ['method' => 'post']]
        ],

        //转换知乎接口
        '[api/live/transformApi]'=> [
            '' => ['api/Api/transformApi', ['method' => 'post']]
        ],


    ];
